﻿
using DualPlaneFR4Paster.Models;
using Microsoft.EntityFrameworkCore;

namespace DualPlaneFR4Paster
{
    public static class ModelBuilderExtensions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<XYZRPoint>().HasData(
                new XYZRPoint
                {
                    Id = 1,
                    Name = "Init",
                    Alias = "初始点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 2,
                    Name = "SuckPicker1",
                    Alias = "头1取料点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 3,
                    Name = "SuckPicker2",
                    Alias = "头2取料点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 1,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 4,
                    Name = "SuckPicker3",
                    Alias = "头3取料点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 2,
                    RIndex = 1
                },
                new XYZRPoint
                {
                    Id = 5,
                    Name = "SuckPicker4",
                    Alias = "头4取料点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 3,
                    RIndex = 1
                },
                new XYZRPoint
                {
                    Id = 6,
                    Name = "FlyStartPicker",
                    Alias = "飞拍起始点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 7,
                    Name = "FlyEndPicker",
                    Alias = "飞拍中止点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 8,
                    Name = "BottomCameraCalib_Sucker1",
                    Alias = "下相机标定点_吸头1",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 9,
                    Name = "BottomCameraCalib_Sucker2",
                    Alias = "下相机标定点_吸头2",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 1,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 10,
                    Name = "BottomCameraCalib_Sucker3",
                    Alias = "下相机标定点_吸头3",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 2,
                    RIndex = 1
                },
                new XYZRPoint
                {
                    Id = 11,
                    Name = "BottomCameraCalib_Sucker4",
                    Alias = "下相机标定点_吸头4",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 3,
                    RIndex = 1
                },
                new XYZRPoint
                {
                    Id = 12,
                    Name = "TopCameraCalib",
                    Alias = "上相机标定点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 13,
                    Name = "TopCameraCenter_Suck1",
                    Alias = "上相机旋转中心_吸头1",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 14,
                    Name = "TopCameraCenter_Suck2",
                    Alias = "上相机旋转中心_吸头2",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 1,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 15,
                    Name = "TopCameraCenter_Suck3",
                    Alias = "上相机旋转中心_吸头3",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 2,
                    RIndex = 1
                },
                new XYZRPoint
                {
                    Id = 16,
                    Name = "TopCameraCenter_Suck4",
                    Alias = "上相机旋转中心_吸头4",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 3,
                    RIndex = 1
                },
                new XYZRPoint
                {
                    Id = 17,
                    Name = "TopCameraHorizontalLine",
                    Alias = "载具横边点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                },
                new XYZRPoint
                {
                    Id = 18,
                    Name = "TopCameraVerticalLine",
                    Alias = "载具竖边点",
                    X = 11.2,
                    Y = 134.5,
                    Z = 20.9,
                    R = 78.9,
                    Floor = 1,
                    ZIndex = 0,
                    RIndex = 0
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 1,
                    Name = "Z1SafePos",
                    Alias = "Z1安全位",
                    Type = typeof(double).Name,
                    Value = "1",
                    Unit = "mm",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 2,
                    Name = "Z2SafePos",
                    Alias = "Z2安全位",
                    Type = typeof(double).Name,
                    Value = "2.1",
                    Unit = "mm",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 3,
                    Name = "Z3SafePos",
                    Alias = "Z3安全位",
                    Type = typeof(double).Name,
                    Value = "3.2",
                    Unit = "mm",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 4,
                    Name = "Z4SafePos",
                    Alias = "Z4安全位",
                    Type = typeof(double).Name,
                    Value = "20",
                    Unit = "mm",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 5,
                    Name = "XJogSpeed",
                    Alias = "X轴调试速度",
                    Type = typeof(double).Name,
                    Value = "20",
                    Unit = "mm/s",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 6,
                    Name = "YJogSpeed",
                    Alias = "Y轴调试速度",
                    Type = typeof(double).Name,
                    Value = "20",
                    Unit = "mm/s",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 7,
                    Name = "ZJogSpeed",
                    Alias = "Z轴调试速度",
                    Type = typeof(double).Name,
                    Value = "20",
                    Unit = "mm/s",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 8,
                    Name = "RJogSpeed",
                    Alias = "R轴调试速度",
                    Type = typeof(double).Name,
                    Value = "20",
                    Unit = "mm/s",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 17,
                    Name = "OrgX",
                    Alias = "正面载具原点X",
                    Type = typeof(double).Name,
                    Value = "11.5",
                    Unit = "mm",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 18,
                    Name = "OrgY",
                    Alias = "正面载具原点Y",
                    Type = typeof(double).Name,
                    Value = "11.6",
                    Unit = "mm",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 19,
                    Name = "OrgX",
                    Alias = "反面载具原点X",
                    Type = typeof(double).Name,
                    Value = "12.5",
                    Unit = "mm",
                    Floor = 2
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 20,
                    Name = "OrgY",
                    Alias = "反面载具原点Y",
                    Type = typeof(double).Name,
                    Value = "12.6",
                    Unit = "mm",
                    Floor = 2
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 21,
                    Name = "OrgWidth",
                    Alias = "载具宽度",
                    Type = typeof(double).Name,
                    Value = "980",
                    Unit = "mm",
                    Floor = 1
                }
                );
            modelBuilder.Entity<MParam>().HasData(
                new MParam
                {
                    Id = 22,
                    Name = "OrgHeight",
                    Alias = "载具高度",
                    Type = typeof(double).Name,
                    Value = "500",
                    Unit = "mm",
                    Floor = 1
                }
                );
        }
    }
}
